package www.wf.pro.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import www.wf.pro.fallback.AdminFallBack;
import www.wf.pro.model.ResultModel;
import www.wf.pro.request.AdminRequest;
import www.wf.pro.response.AdminResponse;


/**
 * @author wang fei
 * @date 2020-07-29 11:14
 */
@Component
@FeignClient(value = "admin-service", fallback = AdminFallBack.class, decode404 = true)
public interface AdminFeign {

    /**
     * Admin端登陆
     */
    @PostMapping("index/login")
    ResultModel<AdminResponse> login(@RequestBody AdminRequest request);

    /**
     * 总后台账号修改与登陆
     */
    @PostMapping("index/register")
    ResultModel<Integer> register(@RequestBody AdminRequest request);
}
